home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
utils
/
xpack142.zip
/
XPACK.DOC
< prev
next >
Wrap
Text File
|
1996-06-08
|
9KB
|
233 lines
XPACK An EXE/COM/SYS Executable file compressor (public domain)
Copyright (c) 1995-1996 by JauMing Tseng
WHAT IS XPACK?
XPACK is an EXE/COM/SYS Executable file compressor. This program
compresses most DOS executable files. Compressed programs use
less disk space because they are much smaller,
yet they run EXACTLY as before.
SYSTEM REQUIREMENTS.
XPACK works on any IBM-compatible machine with 192Kb of free
DOS memory.
method 2 & 3 need extra 64Kb, method4 need extra 192Kb for compression
Every file compressed with XPACK can run on any IBM compatible
system: XT, AT, 80286, 80386, 80486, Pentium or Pentium Pro;
on Intel and non-Intel.
DOS 2.0 or higher is required.
USING XPACK.
Enter the command: XPACK [options] filename
where "filename" is the name of the Executable file to be compressed.
XPACK will only work properly on Executable files, so if you do not
type a file extension, ".EXE", ".COM" or ".SYS" is assumed.
The filename can include drive and path specifications
and wildcards (* or ?).
The various "options" are explained later.
XPACK will make an Executable file that:
(a) is smaller than the original, and
(b) works as before, without any noticeable loss of speed.
The computer may take several seconds to do the compressing. If
you are impatient you can interrupt the process by pressing the
ESC key.
Not every .EXE file can be compressed with XPACK.
(e.g. .EXE with internal overlay packed with option /g)
That's why this program creates backups. The original FILENAME.EXE file
is renamed to FILENAME.OLE. If anything goes wrong you can
restore the original file by entering these 2 commands at
the DOS prompt:
COPY FILENAME.OLE FILENAME.EXE
DEL FILENAME.OLE
(.COM and .SYS files are always packed ok.)
OPTIONS.
Any "options" that you use are typed after "XPACK" and
before "FILENAME".
Options are all case-insensitive, separated by spaces, and begin
with either the hyphen ('-') or the slash ('/') character.
Here are the details of the command line options:
-? This switch invokes option -h
-h This switch tells XPACK to display a
Help Screen to the DOS console device.
You can use "XPACK /? > XPACK.HLP" to save it.
-2 This switch tells XPACK to use pack method 2
3rd compression ratio
fastest compression
quickest extraction
-3 This switch tells XPACK to use pack method 3
2nd best ratio
-4 This switch tells XPACK to use pack method 4 (default)
best ratio
-x expand a compressed .COM or .SYS file.
-f This switch tells XPACK to convert the file even if
the result is bigger than the original file. (Not many
users will take advantage of this option!)
-o This switch tells XPACK to override the default
generation of FILENAME.OLE backup files. (Use this only
if you have already determined that XPACK compresses
the file(s) successfully.)
-g This tells XPACK to merge an overlay into packed file.
(See note below concerning files that cannot be packed.)
Without the -g option, XPACK does not try to compress
an .EXE file that contains overlays.
The -g option may not work with every .EXE that contains
an overlay. It works well with .EXE files compiled from
text (ASCII) with TURBOTXT (an excellent program that is
supplied with the registered version of the TURBOBAT
batch file compiler) and overlay programs compiled by
TURBO/BORLAND pascal compiler.
EXAMPLES.
~~~~~~~~~
To compress all the .EXE files in the current directory
just type:
XPACK *.EXE
To compress without backup all .EXE files in C:\PROGS,
type:
XPACK /O C:\PROGS\*.EXE
To pack all the Executable files using method 2, enter this
command:
XPACK /2 *
To compress BUMF.EXE (made from BUMF.TXT using TURBOTXT),
enter the command:
XPACK -g BUMF
FILES THAT CAN'T BE PACKED.
Some files can't be compressed with XPACK.
- Programs that check the CRC of a file
- Files that store configuration data internally
- Drivers that can be loaded in a
config.sys file (EMM386.EXE)
- Some files with "overlays" or DOS4GW overlays, etc..
Some "overlaid" files can't be compressed because
when you compress such a file the overlay offset
changes and the compressed program may not find
an overlay.
WINDOWS AND OS/2 FILES.
We cannot Pack Windows or OS/2 New .EXEs are because at the
ends of these files there are resources, which have to be
located there. (e.g. the BITMAPs, Dialogue, Boxes,
Buttons, and Icons)
These resources are loaded not with the execution
of the file, but only when needed by Windows or OS/2.
Windows and OS/2 files are automatically recognized by
XPACK.
DISTRIBUTING XPACK.
The XPACK utility is protected by copyright, and may be
distributed only according to the following limitations:
1) NO price may be charged, other than a fee for copying
and mailing the disk.
2) The utility and documentation must be included together,
in unmodified form. The XPACK.COM, XPACK.DOC and XPACK.BG5
files must stay together.
XPACK can be freely uploaded to any BBS, online system or
something similar, and can be freely included on any CD-ROM.
Programs compressed with XPACK may be distributed without
royalties or licensing.
CREDITS.
Optimized by http://www.xs4all.nl/~feldmann
Revised documentation (XPACK.DOC) by John Kiernan.
I thank the following people for testing and suggestions:
Fred Lu, John Kiernan, ChengChang Liu, Harald Feldmann, Jeff Gilchrist,
Henrik Haftmann, Michal Weis, Peter Hubinsky (Slovak Antivirus Center),
Cristi Bradiceanu (The DOP), Tomas Hajny, Roeland Louwe Kooijmans,
Keith Petersen. Thank you!
HOW DOES XPACK WORK?
The XPACK utility works by compressing an
executable file. The encoded program is written back to
disk under the original file name, with a relocating
decoder attached to the file.
When the executable file executes, control passes to the
relocating decoder, which relocates itself (and the
encoded data) higher in memory. It then decodes the
program into the same place it would have been loaded if
it were not encoded. The XPACKed program resets the registers
and flags to their original forms and starts the program
just as if there had never been any encoding.
If a "CRC" check failure occurs during decoding .EXE, it will
display a message: "CRC error" and return the user to DOS.
XPACK has a security function that prevents the .EXE program
from running if it has been tampered with or accidentally
corrupted. You can be pretty certain that your program will
come up with all the proper screens without hanging
due to unwanted modification. Your program's underlying
data will not be left in the open (to any one with a hex editor
or disassembler) and your code will be safer from others' eyes.
HELP and SUGGESTED IMPROVEMENTS.
Send them to the author's e-mail
address:
s8203143@simon.pu.edu.tw
URL:
http://140.128.9.3/home1/86Ga/s8203143/public_html/xpack.html
The latest version of XPACK can always be found on:
Slovak Antivirus Center: ftp.elf.stuba.sk /pub/pc/pack
or its mirrors:
ftp.vse.cz /pub/msdos/SAC/pc/pack (Czech)
ftp-beer.bke.hu /vol1/pub/sac/pc/pack (Hungary)
ftp.cs.tu-berlin.de /pub/msdos/mirrors/stuba/pc/pack (Germany)
http://192.217.228.45:80/pub/sac/pack.htm (USA)
DISCLAIMER.
Under no circumstances can I be held responsible for any damage
caused by files in this or any other package containing programs
written by me.
All programs mentioned in this documentation are trademarks of their
respective owners. They are used for identification purposes only.
End of the XPACK documentation file.